package com.gxuwu.admin.mapper;

import com.gxuwu.admin.entity.Permission;
import com.gxuwu.admin.entity.PermissionExample;
import java.util.List;

import com.gxuwu.admin.entity.RolePermission;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.PostMapping;

@Mapper
public interface PermissionMapper {
    int countByExample(PermissionExample example);

    int deleteByExample(PermissionExample example);

    int deleteByPrimaryKey(String id);

    int insert(Permission record);

    int insertSelective(Permission record);

    List<Permission> selectByExample(PermissionExample example);

    Permission selectByPrimaryKey(String id);

    int updateByExampleSelective(@Param("record") Permission record, @Param("example") PermissionExample example);

    int updateByExample(@Param("record") Permission record, @Param("example") PermissionExample example);

    int updateByPrimaryKeySelective(Permission record);

    int updateByPrimaryKey(Permission record);

    List<Permission> getAssign(String roleId);

    List<Permission> getNoAssign(String roleId);

    void saveRolePermissionRelationShip(@Param("permissionIdList") String[] permissionIdList,
                                        @Param("rolePermission") RolePermission rolePermission);
}
